import Vue from 'vue'
import { sync } from 'vuex-router-sync'
import App from './components/App'
import router from './router'
import store from './store'
import VueLazyload from 'vue-lazyload'
import axios from './request.js'

sync(store, router)

Vue.use(VueLazyload, {
  preLoad: 1.3,
  error: '../static/3_img_load_fail2.png',
  loading: '../static/3_img_load_fail2.png',
  attempt: 1,
  silent: false
})

const app = new Vue({
  router,
  store,
  ...App
})

Vue.prototype.$http = axios

export { app, router, store }
